<div id="head_wrapper" class="">
	<div id="s_fm" class="s_form s_form_login ">
		<div class="s_form_wrapper  soutu-env-nomac soutu-env-newindex" id="s_form_wrapper">
			<div id="lg" class="s-p-top">
				<img hidefocus="true" id="s_lg_img_aging" class="index-logo-aging-tools" src="{SITE_LOGO}" width="270"  title="" cursor="default">
			</div>
			{if dr_is_app('jiansuo') && $jiansuokai == 0}
				<form id="searchForm1" action="{CLIENT_URL}index.php" method="get" class="fm  has-soutu d-buhuanhang" >
					<input type="hidden" name="s" value="jiansuo">
					<input type="hidden" name="c" value="home">
					<input type="hidden" name="m" value="index">
					<input type="hidden" name="lei" value="1">
					<span id="s_kw_wrap" class="bg s_ipt_wr new-pmd quickdelete-wrap">
						<!--span class="soutu-btn"></span-->
						<input type="text" class="s_ipt" placeholder="搜索..." name='k' value='{$_GET['k']}' id="kw1" maxlength="100" autocomplete="off">
					</span>
					<span class="btn_wr s_btn_wr bg" id="s_btn_wr">
						<input type="submit" value="搜索一下"  class="btn self-btn bg s_btn" >
					</span>
				</form>
				{if $qingchunwenda =='1'}
				<span class="btn s_btn_wr bg d-div-you d-wenda d-yincang" id="d-wenda" onclick="javascript:dr_add_son_fabu_tiezi({$qingchunwendaid},'{$qingchunwendajianjie}','{$qingchunwendamingcheng}');">
					<div   class="s_btn-wenda" > <i class="bi bi-question-circle"></i> {$qingchunwendaming}</div>
				</span>
				{/if}
			{else}
				<form id="searchForm1" action="{CLIENT_URL}index.php" method="get" class="fm  has-soutu ">
					<div class="d-buhuanhang">
					<input type="hidden" name="s" value="quan">
					<input type="hidden" name="c" value="sou">
					<input type="hidden" name="m" value="index">
					<span id="s_kw_wrap" class="bg s_ipt_wr new-pmd quickdelete-wrap">
						<!--span class="soutu-btn"></span-->
						<input type="text" class="s_ipt" name='k' placeholder="搜索..." value='{$_GET['k']}' id="kw1"  maxlength="100" autocomplete="off">
					</span>
					<span class="btn_wr s_btn_wr bg" id="s_btn_wr">
						<input type="submit" value="搜索一下"  class="btn self-btn bg s_btn" >
					</span>
					</div>
					
				</form>
				{if $qingchunwenda =='1'}
				<span class="btn s_btn_wr bg d-div-you d-wenda d-yincang" id="d-wenda" onclick="javascript:dr_add_son_fabu_tiezi({$qingchunwendaid},'{$qingchunwendajianjie}','{$qingchunwendamingcheng}');">
					<div   class="s_btn-wenda" > <i class="bi bi-question-circle"></i> {$qingchunwendaming}</div>
				</span>
				{/if}
			{/if}
			<script>
			    // 这段js是用来执行搜索的
			    /*function dr_post_comment(name) {
			        var value = $("#"+name).val();
					console.log("value",value);
			        if (value.trim() === "") {
						$("#"+name).focus()
						dr_tips(0, "请输入关键词");
			            return false;
						//location.href=url.replace('xun2rui2cms', encodeURIComponent(value));
			        } else {
						
					}
			        
			    }*/
				$(document).ready(function() {
					$('#searchForm').on('submit', function(event) { 
						 
					        var inputValue = $('#kw').val().trim();  
					        if (inputValue === '') {  
					            dr_tips(0, "请输入关键词");  
					            event.preventDefault(); // 阻止表单提交  
					            $('#kw').focus(); // 将焦点设置回输入框  
					        }  
					    });
					$('#searchForm1').on('submit', function(event) {
						 
					        var inputValue = $('#kw1').val().trim();  
					        if (inputValue === '') {  
					            dr_tips(0, "请输入关键词");  
					            event.preventDefault(); // 阻止表单提交  
					            $('#kw1').focus(); // 将焦点设置回输入框  
					        }  
					    });
					$('#searchForm2').on('submit', function(event) {
						 
					        var inputValue = $('#kw2').val().trim();  
					        if (inputValue === '') {  
					            dr_tips(0, "请输入关键词");  
					            event.preventDefault(); // 阻止表单提交  
					            $('#kw1').focus(); // 将焦点设置回输入框  
					        }  
					    });
				        
				})

			</script>
			<div>
				
				
				
			</div>
			<div  class="d-kuan d-shang-10 d-yuanjiao-10" style="height: 90px;background: #e7e7e7;">
			    <a href="{$qingchunguanggaourl}" >
				<img hidefocus="true"   src="{dr_thumb($qingchunguanggao)}" width="100%" height="90" title="" cursor="default" class="d-yuanjiao-10">
				</a>
			</div>
			<div class="d-kuan d-shang-10">
			    
			</div>
			
			
			
		</div>
		
	</div>
<div class="d-clear"></div>
</div>

<div class="container">
    <div class="row">
		{if $member}
		    {php $jiaruquandata=\Phpcmf\Service::M()->table('1_quan_cart')->where('uid', $member.id)->getAll();}
			
			{php $myquandata=\Phpcmf\Service::M()->table('1_quan')->where('uid', $member.id)->getAll();}
			
			<?php 
			    $youmyquandata = [];
			    foreach ($myquandata as $v => $data) {
			    	$youmyquandata[] = $data['id'];
			    }
				$jiaquandata = [];
				foreach ($jiaruquandata as $v => $data) {
					$jiaquandata[] = $data['cid'];
				}
				$youmyquandataa = implode(',',$youmyquandata);
				$jiaquandatab = implode(',',$jiaquandata);
				
				$stringA=$youmyquandataa;
				$stringB=$jiaquandatab;
				// 使用str_getcsv函数将字符串转换为数组，并去掉可能的空值  
				$arrayA = array_filter(str_getcsv($stringA, ','), 'strlen');  
				$arrayB = array_filter(str_getcsv($stringB, ','), 'strlen');
				
				
				// 找出交集  
				$intersection = array_intersect($arrayA, $arrayB);
				// 找出非交集（即A中存在但B中不存在的，和B中存在但A中不存在的）  
				$diffA = array_diff($arrayA, $arrayB);  
				$diffB = array_diff($arrayB, $arrayA); 
				// 合并两个非交集数组  
				$nonIntersection = array_merge($diffA, $diffB);
				$jiaquandatas = implode(',',$nonIntersection);
				dr_debug('文件名称$nonIntersection',$jiaquandatas);
				
				
			?>
			
			{if $myquandata}
			    <div class="col-xs-12 mr-2"><i class="bi bi-list"></i> 我创建的圈子</div>
				{module module=quan  simia=0 uid=$member.id num=8}
				<div class="col-xs-3 mr-2">
					<div class="d-kuan  d-yuanjiao-10 d-beijing-baise d-shangxia-10 d-quxian-0" style=" text-align: center;align-items: center;height: 105px;">
						
						<a href="{$t.url}" style="">
							
						<img hidefocus="true"   src="{dr_thumb($t.thumb)}" width="60" height="60"  title="" cursor="default" style="margin-top: 15px;">
						<br>
						{dr_strcut($t['title'], 8, '')}
						<div class=d-clear""></div>
						</a>
						<div class=d-clear""></div>
					</div>
				</div>
				{/module}
				
			{else}
			    
			{/if}
		    {if $nonIntersection}
			    <div class="col-xs-12 mr-2"><i class="bi bi-list"></i> 加入的圈子</div>
				{module module=quan simia=0 IN_id=$jiaquandatas num=8}
				<div class="col-xs-3 mr-2">
					<div class="d-kuan  d-yuanjiao-10 d-beijing-baise d-shangxia-10 d-quxian-0" style=" text-align: center;align-items: center;height: 105px;">
						
						<a href="{$t.url}" style="">
							
						<img hidefocus="true"   src="{dr_thumb($t.thumb)}" width="60" height="60"  title="" cursor="default" style="margin-top: 15px;">
						<br>
						{dr_strcut($t['title'], 8, '')}
						<div class=d-clear""></div>
						</a>
						<div class=d-clear""></div>
					</div>
				</div>
				{/module}
				
			{else}
			    
			{/if}
			    <div class="col-xs-12 mr-2"><i class="bi bi-record-circle"></i> 推荐圈子</div>
			    {module module=quan simia=0 flag=1  num=8}
			    <div class="col-xs-3 mr-2">
			    	<div class="d-kuan  d-yuanjiao-10 d-beijing-baise d-shangxia-10 d-quxian-0" style=" text-align: center;align-items: center;height: 105px;">
			    		
			    		<a href="{$t.url}" style="">
			    			
			    		<img hidefocus="true"   src="{dr_thumb($t.thumb)}" width="60" height="60"  title="" cursor="default" style="margin-top: 15px;">
			    		<br>
			    		{dr_strcut($t['title'], 8, '')}
			    		<div class=d-clear""></div>
			    		</a>
			    		<div class=d-clear""></div>
			    	</div>
			    </div>
			    
			    {/module}
		{else}
			{module module=quan simia=0 flag=1  num=8}
			<div class="col-xs-12 mr-2">推荐圈子</div>
			<div class="col-xs-3 mr-2">
				<div class="d-kuan  d-yuanjiao-10 d-beijing-baise d-shangxia-10 d-quxian-0" style=" text-align: center;align-items: center;height: 105px;">
					
					<a href="{$t.url}" style="">
						
					<img hidefocus="true"   src="{dr_thumb($t.thumb)}" width="60" height="60"  title="" cursor="default" style="margin-top: 15px;">
					<br>
					{dr_strcut($t['title'], 8, '')}
					<div class=d-clear""></div>
					</a>
					<div class=d-clear""></div>
				</div>
			</div>
			{/module}
		{/if}
		
	</div>
</div>


<style>
	
</style>
{php $datacloud = \Phpcmf\Service::M('app')->get_config('cloud');}
<script type="text/javascript">



</script>